<template>
  <div class="list">
    <div class="box">
      <el-table
      class="list-table"
        :data="tableData"
        style="width: 100%"
      >
        <el-table-column
          type="selection"
        >
        </el-table-column>
        <el-table-column
          prop="hangye_name"
          label="分析维度"
          width="180"
        >
        </el-table-column>
        <el-table-column
          prop="count"
          label="企业数量（户）"
        >
        </el-table-column>
        <el-table-column
          label="所占比例"
        >
            <template slot-scope="scope">
          
              <el-progress :percentage="scope.row.bili"></el-progress>
            </template>
        </el-table-column>
      </el-table>
     <!-- <page
        :total="total"
        :current.sync="condition.page"
        :size.sync="condition.size"
        @change="search"
      />-->
    </div>
  </div>
</template>

<script>
import { fetchRegion, fetchIndustry } from "@/api";
import Page from "@/components/list/page"
import Api from "@/api/companyMap";
export default {
  components: {
    Page
  },
  data() {
    return {
      total:100,
      tableData:[
        {
          id: 123
        }
      ],
      params: {
        page:1,
        pagesize:10,
        fenxi:1,
        lat:'',
        lng:'',
        radius:'',
      
      },
      loading:true,
      condition: {
        page:1,
        size:10
      }
    }
  },
  created() {
       this.params.radius=this.$route.query.radius
    this.params.lat=this.$route.query.lat
    this.params.lng=this.$route.query.lng
    this.search()
  },
  methods: {
    search(){
         Api.fetchMapCompanies(
        this.params,
        (res) => {
          if (res.code == 200) {
           this.tableData=res.aggregations
          }
        },
        (err) => {
          this.loading = false;
        }
      );
    }
  }
};
</script>

<style lang="scss" scoped>
@import "@/styles/map/analysis/index";
</style>

<style>
.el-table thead {
  color: #2F3133;
}
.el-table th {
  background-color: #F5F7F9;
}
</style>
